In various fields, such as data communications and data storage, the data is protected by applying Error Correction Coding (ECC). ECC typically involves calculating redundancy or parity bits that can be used for detecting and correcting corrupted data. Some types of error correction codes, such as Low-Density Parity-Check (LDPC) and Generalized LDPC (GLDPC) codes, can be defined using a respective parity-check matrix.